<div id="app-container" class="container" myapp="STORE_WECHAT_INFOS_EDIT">

  <div class="app">
     <div class="app-inner clearfix">
      <div class="widget-list-filter">
        <%= search_form_for @q, url: ems_store_staff_events_path do |f| %>
          <div class="date nav_item">
            <span>日期</span>
            <input type="text" value="<%= @format_month %>" name="month" style="text-align:center;" class="datePicker">
            <span style="margin-left:20px;">关键字</span>
            <input type="text" placeholder="输入员工姓名进行查找" name="q[full_name_cont]" value="<%= @name %>" class="width-150">
            <%= submit_tag "查询", class: "btn query_btn"%>
          </div>
        <% end %>


        <!-- <%= link_to "添加事件", new_ems_store_staff_event_path, class: 'ui-btn ui-btn-success' %> -->
        <p class="help-block error-message flash-notice" style=""> <%= notice %></p>
      </div>
         <table id="wechat_table" class="ui-table ui-table-list">
          <thead>
              <tr>
                <th>
                  #
                </th>
                <th>
                  姓名
                </th>
                <th>
                  部门
                </th>
                <th>
                  职位
                </th>
                <th>
                  员工编号
                </th>
                <th>
                  考勤金额
                </th>
                <th>
                  奖励金额
                </th>
                <th>
                  惩戒金额
                </th>
                <th>
                  加班金额<i class="fa fa-question-circle" aria-hidden="true" title="正常加班记录金额，调休加班记录时间!此处为正常加班的金额!"></i>
                </th>
                <th>
                  加班时间<i class="fa fa-question-circle" aria-hidden="true" title="正常加班记录金额，调休加班记录时间!此处为调休加班的时间!"></i>
                </th>
                <th>
                  调休时间
                </th>
                <th>
                  操作
                </th>
              </tr>
          </thead>
          <tbody>
              <% @store_staffs.each_with_index do |staff, i| %>
                <tr>
                  <td>
                    <%= i + 1 %>
                  </td>
                  <td>
                    <%= staff.full_name %>
                  </td>
                  <td>
                    <%= staff.store_department_name %>
                  </td>
                  <td>
                    <%= staff.store_position_name %>
                  </td>
                  <td>
                    <%= staff.numero %>
                  </td>
                  <td>
                    <%= staff.attendence_amount(@current_month) %>
                  </td>
                  <td>
                    <%= staff.reward_amount(@current_month) %>
                  </td>
                  <td>
                    <%= staff.discipline_amount(@current_month) %>
                  </td>
                  <td>
                    <%= staff.overtime_amount(@current_month) %>
                  </td>
                  <td>
                    <%= staff.overtime_hours %>
                  </td>
                  <td>
                    <%= staff.attendence_off_hours %>
                  </td>
                  <td>
                    <%= link_to '添加', new_ems_store_staff_event_path(store_staff_id: staff) %>

                    <!-- <%= link_to '记录', '#' %> -->
                  </td>
                </tr>
              <% end %>
          </tbody>
        </table>
      </div>
  </div>

</div>
